package com.sky.mapper;

import com.sky.entity.OrderDetail;
import com.sky.entity.Top10;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Classname OrderDetailMapper
 * @Description TODO
 * @Version 1.0.0
 * @Date 2024/7/5 14:51
 * @Created by Ren
 */
@Mapper
public interface OrderDetailMapper {

    Integer insertBatch(List<OrderDetail> orderDetailArrayList);

    /**
     * 根据订单id 去查询订单详情数据
     * @param id
     * @return
     */
    @Select("select * from order_detail where order_id = #{id}")
    List<OrderDetail> getById(Long id);

    List<Top10> getTop10();
}
